from sqlalchemy import Column, Integer, String, Boolean, TIMESTAMP, NUMERIC
from sqlalchemy.ext.declarative import declarative_base

Base = declarative_base()


class DbiShop(Base):
    __tablename__ = "dbi_shop"
    id = Column(Integer, primary_key=True)
    code = Column(String)
    name = Column(String)
    pinyin = Column(String)
    manage_type_id = Column(Integer)
    brand_id = Column(Integer)
    is_enable = Column(Boolean)
    region_id = Column(Integer)
    province_id = Column(Integer)
    city_id = Column(Integer)
    county_id = Column(Integer)
    address = Column(String)
    dog_number = Column(String)
    contact_tel = Column(String)
    order_tel = Column(String)
    fax = Column(String)
    server_ip = Column(String)
    is_open = Column(Integer)
    open_time = Column(TIMESTAMP)
    area = Column(Integer)
    capacity = Column(Integer)
    gc_x = Column(NUMERIC)
    gc_y = Column(NUMERIC)
    remark = Column(String)
    is_center = Column(Boolean)
    is_local = Column(Boolean)
    delflg = Column(Integer)
    create_time = Column(TIMESTAMP)
    creator_id = Column(Integer)
    modify_time = Column(TIMESTAMP)
    modifier_id = Column(Integer)
    upload_flg = Column(Integer)
    download_flg = Column(Integer)
    slogan = Column(String)
    contact_person = Column(String)
    center_id = Column(Integer)
    create_shop_id = Column(Integer)
    emp_num = Column(Integer)
    is_data_receive = Column(Boolean)
    last_time = Column(TIMESTAMP)
    shop_type = Column(Integer)
    is_single_center = Column(Integer)
    is_single_joint = Column(Integer)
    coop_center_id = Column(Integer)

    def __init__(self, id, code, name, pinyin, manage_type_id, brand_id, is_enable, region_id, province_id, city_id, county_id
                 , address, dog_number, contact_tel, fax, server_ip, is_open, open_time, area, capacity, gc_x, gc_y, remark, is_center
                 , is_local, delflg, create_time, creator_id, modify_time, modifier_id, upload_flg, download_flg, slogan, contact_person
                 , center_id, create_shop_id, emp_num, is_data_receive, last_time, shop_type, is_single_center, is_single_joint, coop_center_id):
        self.id = id
        self.code = code
        self.name = name
        self.pinyin = pinyin
        self.manage_type_id = manage_type_id
        self.brand_id = brand_id
        self.is_enable = is_enable
        self.region_id = region_id
        self.province_id = province_id
        self.city_id = city_id
        self.county_id = county_id
        self.address = address
        self.dog_number = dog_number
        self.contact_tel = contact_tel
        self.fax = fax
        self.server_ip = server_ip
        self.is_open = is_open
        self.open_time = open_time
        self.area = area
        self.capacity = capacity
        self.gc_x = gc_x
        self.gc_y = gc_y
        self.remark = remark
        self.is_center = is_center
        self.is_local = is_local
        self.delflg = delflg
        self.create_time = create_time
        self.creator_id = creator_id
        self.modify_time = modify_time
        self.modifier_id = modifier_id
        self.upload_flg = upload_flg
        self.download_flg = download_flg
        self.slogan = slogan
        self.contact_person = contact_person
        self.center_id = center_id
        self.create_shop_id = create_shop_id
        self.emp_num = emp_num
        self.is_data_receive = is_data_receive
        self.last_time = last_time
        self.shop_type = shop_type
        self.is_single_center = is_single_center
        self.is_single_joint = is_single_joint
        self.coop_center_id = coop_center_id
